-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apple: Localization Schema #3475
Open
dgovil
wants to merge
15
commits into
PixarAnimationStudios:dev
Choose a base branch
from
dgovil:localization
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit adds two applied API schemas to UsdUI as an attempt to make it a Universally Accessible Scene Description. Disclaimer: This addition does not represent any future feature support in our products. These schemas are borne out of discussing the needs for the ecosystem to accommodate a wider range of users. 2. Localization schema as discussed at ## Overview A brief overview of the two schemas: ### Accessibility API [Proposal](https://github.com/PixarAnimationStudios/OpenUSD-proposals/tree/main/proposals/accessibility) ``` def "Foo"( apiSchemas = ["AccessibilityAPI:default"] ) { string accessibility:label = "Short Label" string accessibility:description = "A longer description of this prim" uniform token priority = "standard" } ``` UsdUIAccessibilityAPI is a multiple apply schema. Each instance has three attributes: label: A short description of the prim description: An extended description of the prim priority: A hint to a runtime on how this instance should be valued The default instance does not namespace itself with the instance name as we believe it will be the only one specified in many cases, and the excess namespace doesn't add clarity. As a convenience, the API specifies a default name so users of Apply() do not need to specify a name most of the time. ### Localization API [Proposal](https://github.com/PixarAnimationStudios/OpenUSD-proposals/tree/main/proposals/language) ``` def "Foo" ( apiSchemas = ["LocalizationAPI:default", "LocalizationAPI:fr_CA"] ) { uniform token localization:lang = "en_US" custom string foo = "Hello" custom string foo:lang:fr_CA = "Bonjour" custom string foo:lang:hi_IN = "नमस्ते" } ``` UsdUILocalizationAPI is also a multiple apply schema. However here it uses the multiple apply to denote what language are available or that a default localization is available on a prim. It includes one attribute that doesn't use an instance name called `localization:langauge` which specifies the default language to assume. All other applications are suffixed to properties with `:lang:<language>` ## Feedback and Remaining Work It would be greatly appreciated if feedback could be provided with a focus on the schema first so we can nail down how to represent the data in the USD. I also haven't finished wrapping the LocalizationAPI methods in Python because I would like to first get feedback on the C++ API so that I may iterate faster. Once we feel the API looks good, I'll handle the Python bindings and write appropriate tests for them as well.
…or primvars" This reverts commit c4bce75.
Filed as internal issue #USD-10529 (This is an automated message. See here for more information.) |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change(s)
This PR includes the localization schema as defined previously in the Accessibility PR. As requested, it has been split out.
Overview (if applicable)
Proposal
Feedback and Remaining Work
It would be greatly appreciated if feedback could be provided with a focus on the schema first so we can nail down how to represent the data in the USD.
I have not wrapped any of the custom methods in Python yet, and will do so when we reach better consensus on the schema + API.
[ ] I have created this PR based on the dev branch
[ ] I have followed the coding conventions
[ ] I have added unit tests that exercise this functionality (Reference:
testing guidelines)
[ ] I have verified that all unit tests pass with the proposed changes
[ ] I have submitted a signed Contributor License Agreement (Reference:
Contributor License Agreement instructions)